<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1 id="h1" onclick="sub()"></h1>
	</body>
	<script>
        function sub(){
            window.postMessage("nihao","*")
        }
        var h1 = document.getElementById("h1")
		window.addEventListener('message',function(e){
            h1.innerHTML = e.data
		    console.log(e.data);
		},false);
	</script>
</html>

